let arr1 = []
let arr2 = [1, 2, 3]
let count = 0
let list1 = document.getElementById('list1')
let list2 = document.getElementById('list2')

let setList1 = () => {
  arr1.push(count++)
  list1.innerHTML = arr1.map(item => `<li>${item}</li>`).join('')
}

setList1()
// let timer1 = setInterval(() => {
//   setList1()
//   if (count > 100) {
//     clearInterval(timer1)
//   }
// }, 1000)

function setList2() {
  list2.innerHTML = arr2.map(item => `<li>${item}</li>`).join('')
}

setList2()
